Repository navigation
feat(etb): file entries under an Einsatzabschnitt and filter by it - #992
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 5 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
ed50e7f to
e33259f
Compare
|
@coderabbitai review |
Action not completed
|
An ETB entry can now be assigned to a live Abschnitt or Unterabschnitt: from a sticky chip strip in the entry line, or from an Abschnitt picker in the edit panel that also changes or removes it. A quick filter above the table shows one Abschnitt at a time and combines with "Nur Lagemeldungen" and "Systemmeldungen ausblenden". Filed rows carry a badge in the grid and the phone cards, and the PDF prints the Abschnitt above the entry text. The entry stores the Abschnitt by id (for the filter) and by the label it had when filed (for display), so it reads the same after a rename or a dissolve. App-written entries, Bereitstellungen, partner Einsatzleitungen and dissolved nodes are refused; every change writes a System line. Migration V46 adds etb_entries.section_id/section_name. A client may now send assignJournalEntrySection and addJournalEntry carries an optional sectionId, so ProtocolVersion and MinimumProtocolVersion rise to 44. Fixes #971 Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Thomas Müller <[email protected]>
…d trip Kills the surviving mutants of the diff mutation run on the ETB view model's Abschnitt strips and edit picker, covers a joined device filing and moving an entry through the host, and records why the remote session's AddJournalEntry is not mutated by the Sync project's run. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Thomas Müller <[email protected]>
The entry line filed a new ETB entry through a strip of chips, one per Abschnitt. It now uses the same NodeChoicePicker as the edit panel: "nicht zugeordnet" plus every live Abschnitt and Unterabschnitt, the closed picker naming the one in force. The choice stays sticky; picking "nicht zugeordnet" replaces the second tap that used to clear it. The quick filter above the grid keeps its chips. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Thomas Müller <[email protected]>
The entry line's Abschnitt picker sat on a line of its own above the fields. It is now a field in the dock's row, after AN and before EINTRAG, with the same header and chevron as VON and AN and their width; on a phone it fills the line like the others. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Thomas Müller <[email protected]>
e33259f to
23dd5b9
Compare
|
@coderabbitai review |
Action not completed
|



Summary
ETB entries can now be filed under an Einsatzabschnitt and the ETB filtered by it.
ABSCHNITTdropdown in the row of fields, between AN and EINTRAG, with the same header and chevron as VON and AN. It is the sameNodeChoicePickeras the edit panel: "— nicht zugeordnet —" plus every live Abschnitt and Unterabschnitt, in the Organisation's order. "nicht zugeordnet" is chosen at first, and the dropdown is hidden while the incident has no Abschnitt. The choice is sticky: it stays for the next entry, and picking "nicht zugeordnet" clears it. Radio traffic from one Abschnitt comes in runs, and the closed dropdown names the Abschnitt in force right beside the field, so the choice is always in view. VON stays non-sticky, because a leftover sender has no such sign.ABSCHNITTpicker (the sharedNodeChoicePicker, including "— nicht zugeordnet —") to set, change or remove the Abschnitt. SPEICHERN writes it. When the entry's Abschnitt has since been dissolved, the picker still shows it under its stored name.IsVisible.EtbSection. A sixth column would have squeezed every row for the few that carry one.How it is stored
As the issue asks, the Abschnitt is stored as a value on the entry.
EtbEntrygainsSectionIdandSectionName:SectionIdis what the filter matches, so a rename does not split the filter.SectionNameis theIncident.NodeLabelat the moment of assignment (e.g. "Süd / Tiefgarage"), so the entry still reads as it did after a rename or dissolve. A test pins this.Domain rules:
Incident.AddJournalEntrytakes an optionalsectionId.Incident.AssignJournalEntrySection(clock, op, entryId, Guid?)sets, changes or removes the Abschnitt. It writes a System line ("ETB-Eintrag 14:00 → Süd" / "…: Abschnitt aufgehoben (vorher Nord)") and is a no-op when nothing changes.Versions
Rebased onto
main, which took V46 and protocol 44 for the raster Kartenebenen (#993) and protocol 45 for the numbered CSA-Trupp (#996); this PR is renumbered above them.etb_entries.section_idandsection_name, both nullable. Also added toSchemaGuard.ExpectedColumns.AddJournalEntryCommandgets a defaultedSectionId = null, so an older client's entry is simply filed nowhere.assignJournalEntrySectioncommand means a host at 45 cannot deserialize it, so the floor rises too.VersionHandshakeTestspins for 44 and 45 are loosened to "at least", and a new pin holds 46/46.Screenshots
Before (
origin/main): no Abschnitt anywhere in the ETB.After: quick filter "Alle", badges on the filed rows.
After: quick filter on "Süd".
After: edit panel with the Abschnitt picker. Before the dropdown, the entry line still had a chip strip, visible here with "Nord" chosen.
After: the Abschnitt dropdown between AN and EINTRAG, with "Nord" chosen (sticky).
Tests
EtbSectionAssignmentTests): add and assign rules, refused kinds, app-written entries refused, no-op, System line text, a rename or dissolve keeps the stored name, a text edit keeps the Abschnitt, closed incident,Rehydrate.SchemaReconciliationTestsgreen.addJournalEntrywithoutsectionIdfrom an old client;WorkspaceCollaborationTests.EtbSectionViewModelTests): entry dropdown contents, sticky choice and clearing it with "nicht zugeordnet", a dissolved Abschnitt leaving the dropdown, filter combinations with both checkboxes, a dissolved Abschnitt in the filter, edit picker set/change/remove, an assignment from elsewhere.EtbSectionStripTests): strips hidden without Abschnitte, the entry dropdown files the entry and the grid shows the badge, the quick filter narrows the grid, the edit picker is shown. WithRENDER_OUTset, it also writes the screenshots above.Evidence
After the rebase onto
c4d4a1fdand the dropdown commits:make clean ci: all 9 test assemblies passed (7,547 tests), 0 warnings.make format-check: clean.make codeql: 0 results.Fixes #971
🤖 Generated with Claude Code